package org.wxy.sdk.util.imageloader;

import android.content.Context;
import android.support.annotation.DrawableRes;
import android.widget.ImageView;

import org.wxy.sdk.util.imageloader.glideprogress.ProgressLoadListener;


/**
 * Created by soulrelay on 2016/10/11.
 * Class Note:
 * abstract class/interface defined to load image
 * (Strategy Pattern used here)
 */
public interface BaseImageLoaderStrategy {
    void loadImage(String url, ImageView imageView);

    void loadImageWithAppCxt(String url, ImageView imageView);

    void loadImage(String url, int placeholder, ImageView imageView);

    void loadLocalImage(String url, int placeholder, ImageView imageView);

    void loadImage(Context context, String url, int placeholder, ImageView imageView);

    void loadGifImage(String url, int placeholder, ImageView imageView);
    void loadGifImage(String url, ImageView imageView);

    void loadLocalGifImage(String url, int placeholder, ImageView imageView);

    void loadResGifImage(@DrawableRes int resId, ImageView imageView);

    void loadImageWithProgress(String url, ImageView imageView, ProgressLoadListener listener);

    void loadLocalImageWithProgress(String url, ImageView imageView, ProgressLoadListener listener);

    void loadGifWithPrepareCall(String url, ImageView imageView, SourceReadyListener listener);

    void loadLocalGifWithPrepareCall(String url, ImageView imageView, SourceReadyListener listener);
    //清除硬盘缓存
    void clearImageDiskCache(final Context context);
    //清除内存缓存
    void clearImageMemoryCache(Context context);
    //根据不同的内存状态，来响应不同的内存释放策略
    void trimMemory(Context context, int level);
    //获取缓存大小
    String getCacheSize(Context context);

    String getCacheFile(Context context, String url);

    void saveImage(Context context, String url, String savePath, String saveFileName, ImageSaveListener listener);

}
